package cn.wp.user.mapper;

import cn.wp.basic.mapper.BaseMapper;
import cn.wp.user.domain.WechatUser;
import org.apache.ibatis.annotations.Param;

public interface WechatUserMapper extends BaseMapper<WechatUser> {
    /**
     * 通过openid查询微信用户对象
     * @param openid openid微信用户唯一标识
     * @return
     */
    WechatUser loadByOpenid(String openid);

    /**
     * 微信和登录用户绑定
     * @param loginInfoId   登录信息id
     * @param openid    openid微信用户唯一标识
     */
    void binderWechatAndLoginInfo(@Param("loginInfoId") Long loginInfoId, @Param("openid") String openid);
}
